generic method to access cpu-specific local cycle counter.
Signed-off-by: Keir Fraser <keir@xensource.com>
}
rec = &t_recs[smp_processor_id()][buf->prod % nr_recs];
- rdtscll(rec->cycles);
+ rec->cycles = (u64)get_cycles();
rec->event = event;
rec->data[0] = d1;
rec->data[1] = d2;
#ifndef __X86_TIME_H__
#define __X86_TIME_H__
+#include <asm/msr.h>
+
extern int timer_ack;
extern void calibrate_tsc_bp(void);
struct domain;
extern void init_domain_time(struct domain *d);
+typedef u64 cycles_t;
+
+static inline cycles_t get_cycles(void)
+{
+ cycles_t c;
+ rdtscll(c);
+ return c;
+}
+
#endif /* __X86_TIME_H__ */